<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDeviceGroupSentencesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('device_group_sentences', function (Blueprint $table) {
            $table->increments('id');
            $table->string('wechat_name', 190)->comment('微信账号');
            $table->string('content1', 190)->comment('第一句话术');
            $table->string('content2', 190)->comment('第二句话术');
            $table->integer('device_group_id')->index()->nullable()->comment('设备分组ID');
            $table->integer('priority')->index()->comment('优先级，值越大优先级越高');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('device_group_sentences');
    }
}
